import request from '@/utils/request'

// 查询素材资源列表
export function pageListStorage(query) {
    return request({
        url: '/knowledge/storage/v1/page',
        method: 'get',
        params: query
    })
}

// 查询素材资源列表
export function typeList() {
    return request({
        url: '/knowledge/storage/v1/storage-type-list',
        method: 'get'
    })
}

// 查询素材资源列表
export function listStorage(query) {
    return request({
        url: '/knowledge/storage/v1/list',
        method: 'get',
        params: query
    })
}

// 查询素材资源详细
export function getStorage(id) {
    return request({
        url: '/knowledge/storage/v1/' + id,
        method: 'get'
    })
}

// 新增素材资源
export function addStorage(data) {
    return request({
        url: '/knowledge/storage/v1',
        method: 'post',
        data: data
    })
}

// 修改素材资源
export function updateStorage(data) {
    return request({
        url: '/knowledge/storage/v1',
        method: 'put',
        data: data
    })
}

// 删除素材资源
export function delStorage(id) {
    return request({
        url: '/knowledge/storage/v1/' + id,
        method: 'delete'
    })
}
